package cn.com.jenson.exception;

import cn.com.jenson.system.Code;

public class TokenException extends RuntimeException{
    Integer code;

    public Integer getCode(){
        return code;
    }

    public TokenException() {
        super("用户信息过期，请重新登录");
        this.code = Code.TOKEN_ERR;
    }

    public TokenException(String message) {
        super(message);
        this.code = Code.TOKEN_ERR;
    }

    public TokenException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public TokenException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }
}
